﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Emoney.Cms.Spider;

public partial class Spider_Spider : System.Web.UI.Page
{
    public int pid = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        pid = 1;
    }
    protected void btn01_Click(object sender, EventArgs e)
    {
        //采集凤凰网行业报告
        try
        {
            lblMsg.Text = "开始采集" + DateTime.Now;
            int num = 0;
            CmsGather sdr = new CmsGather();
            sdr.FromIFengHYBG(pid, out num);
            sdr.UpdateIFengHYBG();
            lblMsg.Text = "本次采集完成。本次共采集" + num + "条信息。" + DateTime.Now;
        }
        catch
        {
            lblMsg.Text = "本次采集发生异常" + DateTime.Now;
        }
    }
    protected void btn02_Click(object sender, EventArgs e)
    {
        //采集证星行业报告
        try
        {
            lblMsg.Text = "开始采集" + DateTime.Now;
            int num = 0;
            CmsGather sdr = new CmsGather();
            sdr.FromStockStarHYBG(pid,out num);
            sdr.UpdateStockStarHYBG();
            lblMsg.Text = "本次采集完成。本次共采集" + num + "条信息。" + DateTime.Now;
        }
        catch
        {
            lblMsg.Text = "本次采集发生异常" + DateTime.Now;
        }
    }
}